Reset CFLAGS and CXXFLAGS to a previous value to fix the large release builds.#264
Reset CFLAGS and CXXFLAGS to a previous value to fix the large release builds.#264blast007 wants to merge 1 commit intoBZFlag-Dev:2.4from
Conversation
…e builds. This prevents -g from being added when we aren't building in debug mode.
jwmelto
left a comment
There was a problem hiding this comment.
There is definitely some magic going on here ... I've searched this entire file for "CFLAGS" and it's not possible to assert any knowledge of state.
On line 187, user_CFLAGS is set from $ac_save_CFLAGS (but that initialization is not seen)
On line 188, user_CXXFLAGS is set from $CXXFLAGS with a comment that ac_save_CXXFLAGS is not set yet. ???
CONF_CFLAGS gets appended to, in rational ways, as options are evaluated
Then, on (now) lines 816-820, there is this comment about reverting automatic setting... but they haven't been assigned? Neither have user_CFLAGS or user_CXXFLAGS been updated
All that is to say, I have to take your word for this. The whole thing looking painfully convoluted and difficult to maintain...
|
I'll need to take a close look at the configure.ac file. I do see now that the user_* options are only initialized when in debugging mode, but I could just always init those. I'll poke around with it some more to see if I can figure out why it's adding -g in the first place. |
We noticed that release builds on Linux (and possibly other platforms that use autotools) were including debugging information in the binaries. This change stops the -g compiler option from being automatically added to release builds. Issue #263 reported part of the problem.